<?php
/**
 *
 *
 */
class Yz_Action_Delete
    extends Yz_Action_Abstract
    implements Yz_Action_Delete_Interface
{

    /**
     *  @return bool
     */
    public function execute()
    {
        debug();
        $this->statement = $this
            ->buildDelete()
            ->execute();
        return $this;
    }


    /**
     *  Common Delete statement creator
     *  @param array $tables
     *  @return Yz_SQL_Statement_Delete
     */
    protected function buildDelete()
    {
        debug();
        $tables = $this->tableList;
        $sql = \Yz_SQL_Statement_Delete::create()
            ->delete()
            ->from($tables->current());
        return $sql;
    }


}
